package ASD;

import java.util.Scanner;

public class Demo1 {
	

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int[] arr=new int[5];
		for (int i = 0; i < arr.length; i++) {
			System.out.println("请输入数组中的第"+(i+1)+"个数");
			arr[i]=sc.nextInt();
		}
		testArray(arr);
	}

	public static void testArray(int[] arr) {
		for (int i = 0; i < arr.length; i++) {
			if (i==0) {
				System.out.print("["+arr[i]+",");
			}else if(i== arr.length-1) {
				System.out.print(arr[i]+"]");
			}else {
				System.out.print(arr[i]+",");
			}
		}
		
	}

}
